#include "clog.h"
#include <thread>
#include <unistd.h>
void test1(void)
{
    while(1){

        TOLOG("%s--%d--%f\n", "test1",2, 1.0);
    }
    return ;
}

void test2(void)
{
    while(1){

        TOLOG("%s--%d--%f\n", "test2",2, 1.0);
    }
    return ;
}

void test3(void)
{
    while(1){

        TOLOG("%s--%d--%f\n", "test3",2, 1.0);
    }
    return ;
}

void test4(void)
{
    while(1){

        TOLOG("%s--%d--%f\n", "test4",2, 1.0);
    }
    return ;
}
int main()
{

    INIT_LOG("./", "test", DEBUG);
    TOLOG("%s--%d--%f\n", "123",2, 1.0);
    TOLOG("%s--%d--%f\n", "123",2, 0.9);
    TOLOG("%s--%d--%f\n", "123",2, 1.1);
    TOLOG_LEVEL(ERROR, "%s--%d--%f\n", "789",2, 1.1);
    thread t1 =  std::thread(&test1);
    thread t2 =  std::thread(&test2);
    thread t3 =  std::thread(&test3);
    thread t4 =  std::thread(&test4);

    t1.join();
    t2.join();
    t3.join();
    t4.join();
    
    return 0;
}